//2009/08/16 19:11:56
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Elections
{
public:
    int visit(vector <string> like)
    {
		long double mmin = 100.0; //Here, the double is not acceptable. We need a higher precision.
		int dex = -1;
		for(int i=0; i<like.size(); i++)
		{
			int temp = 0;
			for(int j=0; j<like[i].size(); j++)
			{
				if(like[i][j] == '1') temp ++;
			}
			long double perc = 100.0 * temp / like[i].size();
			if(perc < mmin || dex == -1) 
			{
				mmin = perc;
				dex = i;
			}
		}
		return dex;
    }
};
